<T:ViewBase x:Class="WPFExcelReport.TVPBOM02"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    Background="White"  
                    Loaded="Window_Loaded"
     >
    <T:ViewBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:TIMES100  x:Key="X100"/>
        <ucd:TIMES10  x:Key="X10"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PreisConverter  x:Key="PreisConverter"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>  
    </T:ViewBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0">
        <WrapPanel>
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=VPBMANDANT:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwVPBOM.VPBMANDANT}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=VPBPART:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwVPBOM.VPBPART}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=VPBTAX:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwVPBOM.VPBTAX}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=VPBPOS:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwVPBOM.VPBPOS}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=VPBWAKZ:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwVPBOM.VPBWAKZ}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=VPBKUNDNR:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwVPBOM.VPBKUNDNR}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=VPBWERK:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwVPBOM.VPBWERK}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=VPBABT:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwVPBOM.VPBABT}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=VPBART:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwVPBOM.VPBART}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=VPBVAR:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwVPBOM.VPBVAR}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=VPBFARBE:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwVPBOM.VPBFARBE}" Width="Auto" />
            </Grid> 
        </WrapPanel>
        <WrapPanel Visibility="{Binding IsVPBOM,Converter={StaticResource ResourceKey=bv}}">
                <ex:TBASE1></ex:TBASE1>
            </WrapPanel>
        </StackPanel>
        <DataGrid  Grid.Row="1"  VerticalAlignment="Top"  
                                   AutoGenerateColumns="False"
                                   EnableRowVirtualization="False"
                                   VerticalScrollBarVisibility="Auto"
                                   HorizontalScrollBarVisibility="Auto"
                                   HeadersVisibility="Column"     
                                   ItemsSource="{Binding vwVPBOM}"  
                                    IsSynchronizedWithCurrentItem="True"
                                   SelectedItem="{Binding Path=dwVPBOM, Mode=TwoWay}"
                                   x:Name="dlgVKP"  
                                   RowDetailsVisibilityMode="Visible" Grid.ColumnSpan="2" Margin="0,0.2,0.2,0"
                    >
            <DataGrid.Columns> 
                <DataGridTextColumn x:Name="VPBMANDANT"
                                    Binding="{Binding Path=VPBMANDANT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBMANDANT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBPART"
                                    Binding="{Binding Path=VPBPART, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBPART}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBTAX"
                                    Binding="{Binding Path=VPBTAX, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBTAX}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBPOS"
                                    Binding="{Binding Path=VPBPOS, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBPOS}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBWAKZ"
                                    Binding="{Binding Path=VPBWAKZ, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBWAKZ}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBKUNDNR"
                                    Binding="{Binding Path=VPBKUNDNR, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBKUNDNR}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBWERK"
                                    Binding="{Binding Path=VPBWERK, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBWERK}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBABT"
                                    Binding="{Binding Path=VPBABT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBABT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBART"
                                    Binding="{Binding Path=VPBART, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBART}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBVAR"
                                    Binding="{Binding Path=VPBVAR, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBVAR}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBFARBE"
                                    Binding="{Binding Path=VPBFARBE, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBFARBE}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBDESS"
                                    Binding="{Binding Path=VPBDESS, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBDESS}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBCOLORIT"
                                    Binding="{Binding Path=VPBCOLORIT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBCOLORIT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBBESCHICH"
                                    Binding="{Binding Path=VPBBESCHICH, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBBESCHICH}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBZUSTAND"
                                    Binding="{Binding Path=VPBZUSTAND, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBZUSTAND}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBGROE"
                                    Binding="{Binding Path=VPBGROE, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBGROE}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBAUFM"
                                    Binding="{Binding Path=VPBAUFM, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBAUFM}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBVERP"
                                    Binding="{Binding Path=VPBVERP, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBVERP}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBANT"
                                    Binding="{Binding Path=VPBANT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBANT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBQTY"
                                    Binding="{Binding Path=VPBQTY, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBQTY}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBGQTY"
                                    Binding="{Binding Path=VPBGQTY, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBGQTY}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBFILLER"
                                    Binding="{Binding Path=VPBFILLER, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBFILLER}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBAENZL"
                                    Binding="{Binding Path=VPBAENZL, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBAENZL}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBAENB"
                                    Binding="{Binding Path=VPBAENB, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBAENB}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBAEND"
                                    Binding="{Binding Path=VPBAEND, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBAEND}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBNEUB"
                                    Binding="{Binding Path=VPBNEUB, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBNEUB}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="VPBNEUD"
                                    Binding="{Binding Path=VPBNEUD, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=VPBNEUD}}"
                                    Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</T:ViewBase> 
 
